package org.jing.ext.web;

import org.jing.core.lang.annotation.IgnoreFieldToString;
import org.jing.core.lang.data.BaseDto;

import java.net.Proxy;

/**
 * Description: <br>
 *
 * @author bksmate <br>
 * @since 2024-12-24 <br>
 */
public class RequestEntity<T> extends BaseDto {
    private WebHeaders headers;

    @IgnoreFieldToString
    private T body;

    @IgnoreFieldToString
    private Proxy proxy;

    public RequestEntity(WebHeaders headers) {
        this.body = null;
        this.headers = headers;
    }

    public RequestEntity(T body, WebHeaders headers) {
        this.body = body;
        this.headers = headers;
    }

    public RequestEntity(T body) {
        this.body = body;
        this.headers = null;
    }

    public RequestEntity() {
        this.body = null;
        this.headers = null;
    }

    public Proxy getProxy() {
        return proxy;
    }

    public void setProxy(Proxy proxy) {
        this.proxy = proxy;
    }

    public WebHeaders getHeaders() {
        return headers;
    }

    public void setHeaders(WebHeaders headers) {
        this.headers = headers;
    }

    public T getBody() {
        return body;
    }

    public void setBody(T body) {
        this.body = body;
    }
}
